package com.article.service.impl;

import java.util.List;

import com.article.dao.IEditorDAO;
import com.article.entity.Editor;
import com.article.service.IEditorService;

@SuppressWarnings("unchecked")
public class EditorServiceImpl implements IEditorService {
	private IEditorDAO editorDAOImpl;

	public Editor findByUserName(String userName) {
		Editor editor = null;
		List<Editor> list = editorDAOImpl.findByUserName(userName);
		if(list != null && list.size() > 0){
			editor = list.get(0);
		}
		return editor;
	}

	public void setEditorDAOImpl(IEditorDAO editorDAOImpl) {
		this.editorDAOImpl = editorDAOImpl;
	}

}
